/*
编译命令:
gcc -o gettimeofday gettimeofday.c

export PATH=/opt/FriendlyARM/toolschain/4.5.1/bin/:$PATH
arm-none-linux-gnueabi-gcc -o gettimeofday gettimeofday.c

export PATH=/opt/FriendlyARM/toolschain/4.4.3/bin/:$PATH
arm-none-linux-gnueabi-gcc -o gettimeofday gettimeofday.c
*/
#include <stdio.h>
#include <sys/time.h>

void main(void)
{
    struct timeval tv;
    struct timezone tz;

    gettimeofday(&tv, &tz);

    printf("%ld,%ld\n", tv.tv_sec, tv.tv_usec);
}
